At 20:22 +0300 on 04/06/1999, Martin Leja wrote:
>
> Thanks for the tip, but if i try the above, i get:
> ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
> Recognized languages are sql, C, internal and the created procedural
> languages.
>
> what is pl/pgsql? I using postgres 6.3.2 (slink/stable debian package), do
> i hve to upgrade to a higer version, or is this plpgsql thing to be
> installed separately?
pl/pgsql is new in 6.4. If you are working with 6.3.2, you may define a
function in SQL as follows:
testing=> CREATE FUNCTION text( float8 ) returns text
testing-> AS 'select textin( float8out( $1 ) )'
testing-> LANGUAGE 'sql';
Test this:
testing=> select text( 18.4 ) || ' is the number';
?column?
------------------
18.4 is the number
(1 row)
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma